GMCS = dmcs -debug -sdk:4

LIB_PARAM = -target:library

SHARE = ./share/*.cs 
BIN = ./build/FuzzyKitten.exe
OUT_SHARE  = ./build/share.dll
OUT_WEBSOCKET  = ./build/WebSocketServer.dll
OUT_VNCCLIENT = ./build/VNCClient.dll
ASSEMBLIES =-r:./lib/Fleck.dll -r:./lib/Mono.Cairo.dll -r:./lib//Mono.Security.dll -r:$(OUT_SHARE)

all:
	make mod_shared
	make mod_websocketserver
	make mod_vncclient
	make binary

mod_shared:
	$(GMCS) $(SHARE) $(LIB_PARAM) -out:$(OUT_SHARE)

mod_websocketserver:
	$(GMCS) ./WebSocketServer/*.cs $(LIB_PARAM) $(ASSEMBLIES) -out:${OUT_WEBSOCKET}

mod_vncclient:
	$(GMCS) ./VNCClient/SecurityImplementation/*.cs ./VNCClient/Renderer/*.cs ./VNCClient/Messages/*.cs ./VNCClient/*.cs ${LIB_PARAM} $(ASSEMBLIES) -out:${OUT_VNCCLIENT}

binary: 
	$(GMCS) *.cs -r:${OUT_WEBSOCKET},${OUT_VNCCLIENT} $(ASSEMBLIES) -target:exe -out:$(BIN)
clean:
	rm build/*


